﻿<%@ Page Title="Cadastro SubMódulo" Language="C#" MasterPageFile="~/Site.Master"
    AutoEventWireup="true" CodeBehind="CadastroSubModulo.aspx.cs" Inherits="GerTestes.Cadastros.CadastroSubModulo" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Panel ID="pnlProjetos" runat="server">
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2>
                            <br />
                            <i class="fa fa-align-justify"></i><span class="break">Consulta Projetos</h2>
                        <div class="panel-actions">
                            <a href="table.html#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
                        </div>
                        <div class="panel-actions">
                            <div style="margin-right: 20px; margin-top: 2.5px;">
                                <asp:TextBox ID="TxtPesquisaGrid" ClientIDMode="Static" CssClass="pesquisa" Width="250px"
                                    placeholder="Localizar..." runat="server" AutoPostBack="True" MaxLength="50"></asp:TextBox>
                            </div>
                        </div>
                    </div>
                    <div class="panel-body">
                        <asp:GridView ID="gvwProjetos" ClientIDMode="Static" runat="server" CssClass="table table-bordered table-striped table-condensed gridDinamica"
                            EmptyDataText="Registros não localizados..." AutoGenerateColumns="False" Width="100%"
                            role="grid" aria-describedby="DataTables_Table_0_info" GridLines="None" DataKeyNames="ID_PROJETO"
                            PageSize="100" OnSelectedIndexChanged="gvwProjetos_SelectedIndexChanged">
                            <Columns>
                                <asp:CommandField ButtonType="Image" SelectImageUrl="~/assets/img/selecionar.png"
                                    ShowSelectButton="True">
                                    <ItemStyle Width="25px" />
                                </asp:CommandField>
                                <asp:BoundField DataField="DESCRICAO" HeaderText="Projeto">
                                    <ItemStyle HorizontalAlign="Left" Width="98%" />
                                </asp:BoundField>
                            </Columns>
                            <PagerStyle CssClass="pagination" Wrap="True" />
                            <SelectedRowStyle CssClass="alert alert-info" Font-Bold="True" />
                        </asp:GridView>
                    </div>
                </div>
            </div>
        </div>
        </span>
    </asp:Panel>
    <asp:Panel ID="pnlModulos" runat="server" Visible="false">
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2>
                            <br />
                            <i class="fa fa-align-justify"></i><span class="break">Módulos x Projeto</h2>
                        <div class="panel-actions">
                            <a href="table.html#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
                        </div>
                        <div class="panel-actions">
                            <div style="margin-right: 20px; margin-top: 2.5px;">
                            </div>
                        </div>
                    </div>
                    <div class="panel-body">
                        <asp:GridView ID="gvwModulos" ClientIDMode="Static" runat="server" CssClass="table table-bordered table-striped table-condensed"
                            EmptyDataText="Registros não localizados..." AutoGenerateColumns="False" Width="100%"
                            role="grid" aria-describedby="DataTables_Table_0_info" GridLines="None" DataKeyNames="ID_MODULO"
                            PageSize="100" OnSelectedIndexChanged="gvwModulos_SelectedIndexChanged">
                            <Columns>
                                <asp:CommandField ButtonType="Image" SelectImageUrl="~/assets/img/selecionar.png"
                                    ShowSelectButton="True">
                                    <ItemStyle Width="25px" />
                                </asp:CommandField>
                                <asp:BoundField DataField="DESCRICAO" HeaderText="Módulo">
                                    <ItemStyle HorizontalAlign="Left" Width="98%" />
                                </asp:BoundField>
                            </Columns>
                            <PagerStyle CssClass="pagination" Wrap="True" />
                            <SelectedRowStyle CssClass="alert alert-info" Font-Bold="True" />
                        </asp:GridView>
                        <br />
                    </div>
                    </span>
                </div>
            </div>
        </div>
    </asp:Panel>
    <asp:Panel ID="pnlSubModulos" runat="server" Visible="false">
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2>
                            <br />
                            <i class="fa fa-align-justify"></i><span class="break">SubMódulos x Módulos</h2>
                        <div class="panel-actions">
                            <a href="table.html#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
                        </div>
                        <div class="panel-actions">
                            <div style="margin-right: 20px; margin-top: 2.5px;">
                            </div>
                        </div>
                    </div>
                    <div class="panel-body">
                        <span class="break">
                            <asp:GridView ID="gvwSubModulos" runat="server" aria-describedby="DataTables_Table_0_info"
                                AutoGenerateColumns="False" ClientIDMode="Static" CssClass="table table-bordered table-striped table-condensed"
                                DataKeyNames="ID_SUBMODULO" 
                            EmptyDataText="Registros não localizados..." GridLines="None"
                                PageSize="100" role="grid" Width="100%" 
                            onrowcommand="gvwSubModulos_RowCommand" onrowcreated="gvwSubModulos_RowCreated" 
                            onrowdatabound="gvwSubModulos_RowDataBound">
                                <Columns>
                                    <asp:TemplateField HeaderText="Editar" ShowHeader="False">
                                        <ItemTemplate>
                                            <abbr title="Editar Submódulo!">
                                                <asp:ImageButton ID="ImgAlterar" runat="server" CausesValidation="false" CommandName="Alterar"
                                                    ImageUrl="~/assets/img/edit.png" Text="Alterar" Width="25px" />
                                            </abbr>
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" Width="1%" />
                                        <ItemStyle HorizontalAlign="Center" Width="1%" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Excluir" ShowHeader="False">
                                        <ItemTemplate>
                                            <abbr title="Excluir Submódulo!">
                                                <asp:ImageButton ID="ImgExcluir" runat="server" CausesValidation="false" CommandName="Excluir"
                                                    ImageUrl="~/assets/img/delete.png" OnClientClick="return ShowConfirm('Tem certeza que deseja excluir?', this.ID);"
                                                    Text="Excluir" Width="25px" />
                                            </abbr>
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" Width="1%" />
                                        <ItemStyle HorizontalAlign="Center" Width="1%" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="DESCRICAO" HeaderText="Módulo">
                                        <ItemStyle HorizontalAlign="Left" Width="98%" />
                                    </asp:BoundField>
                                </Columns>
                                <PagerStyle CssClass="pagination" Wrap="True" />
                                <SelectedRowStyle CssClass="alert alert-info" Font-Bold="True" />
                            </asp:GridView>
                        </span>
                        <asp:Button ID="btnIncluirSubModulo" runat="server" OnClick="btnIncluirSubModulo_Click"
                            Text="Incluir SubMódulo" />
                        <br />
                    </div>
                </div>
            </div>
        </div>
        </span>
    </asp:Panel>
    <asp:Panel ID="pnlEdicao" runat="server" Visible="false">
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2>
                            <br />
                            <i class="fa fa-align-justify"></i><span class="break">
                                <asp:Label ID="lblPnlDescricao" runat="server" Text="Inclusão de SúbMódulo"></asp:Label></h2>
                        <div class="panel-actions">
                            <a href="table.html#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a>
                        </div>
                        <div class="panel-actions">
                        </div>
                    </div>
                    <div class="panel-body">
                        <table class="style1">
                            <tr>
                                <td>
                                    <asp:Label ID="Label1" runat="server" Text="Descrição"></asp:Label>
                                    <br />
                                    <asp:TextBox ID="TxtDescricao" required runat="server" Width="300px" MaxLength="150"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:CheckBox ID="ChkAtivo" runat="server" Text="Ativo?" />
                                </td>
                            </tr>
                        </table>
                        <br />
                        <asp:Button ID="btnConfirmar" runat="server" Text="Confirmar" 
                            onclick="btnConfirmar_Click" />
                        <asp:Button ID="btnCancelar"
                            runat="server" Text="Cancelar" formnovalidate onclick="btnCancelar_Click" />
                    </div>
                </div>
            </div>
        </div>
        </span>
    </asp:Panel>
</asp:Content>
